do "{" ... ( "}" interrupt "{" ... )+ "}"
The 'global escape' concept provides a means for breaking out of a particular
scope based on an interaction.
The syntax for the global escape construct is:
do "{" ... ( "}" interrupt "{" ... )+ "}"
In the following example, the body of the do block is enacted,
involving an interaction between a Buyer and Seller,
followed by some other activities.
During this scoped set of activities, if the Seller returns an
OutOfStock message, then it will cause the flow of control to
move to the first interrupt block. However if the Buyer sends an
OrderExpired or OrderCancelled message,
then the flow will move to the second interrupt block.
do { Order from Buyer to Seller; ... } interrupt { OutOfStock from Seller to Buyer; ... } interrupt { choice at Buyer { expire(OrderExpired) from Buyer to Seller; } or { OrderCancelled from Buyer to Seller); } ... }